package regexobject;

import java.util.Arrays;

/*

 */
public class SplitDemo {//拆分
    public static void main(String[] args) {
        String line="abc123qwe456tyu789ui";
        String[] data=line.split("[0-9]+");
        for (int i=0;i<data.length;i++){
            System.out.println(data[i]);
        }
        //Arrays.toString(data)//将数组转换为字符串（）字符串拼接使用逗号隔开
        System.out.println(Arrays.toString(data));
        line=".123.456...78....";
        data=line.split("\\.");//拆分为字符串数组
        System.out.println(Arrays.toString(data));//将数组拼接为字符串

    }
}
